﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Demo
{
    enum PedlarType
    {
        武器,材料,食物
    }
    class Pedlar:NPC
    {
        private PedlarType ptype;
        public PedlarType Ptype
        {
            get { return this.ptype; }
            set { this.ptype = value; }
        }

        public Pedlar(PedlarType ptype, string name, NPCType type) : base(name,type)
        {
            this.ptype = ptype;
        }
        public override void Speak()
        {
            Console.WriteLine("我叫{0}，我属于{1}类型的NPC，我是{2}NPC，我卖{3}", base.Name, base.Type, this.ptype, this.ptype);
        }
    }
}
